//package com.cf.data.serve.mq;
//
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.cf.data.serve.utils.UUIDGenerator;
//import lombok.extern.slf4j.Slf4j;
//import com.cf.data.serve.entity.HkAlarmFail;
//import com.cf.data.serve.entity.HkNvrAlarm;
//import com.cf.data.serve.service.IHkNvrAlarmService;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
///**
// * @author cuixi
// * @description: 海康其他事件（除比对）消费者
// * @date 2024/7/31
// */
//
//@Component
//@RabbitListener(queues = "alarm_other_queue")
//@Slf4j
//public class OtherAlarmReceiver {
//
//    @Autowired
//    private IHkNvrAlarmService hkNvrAlarmService;
//
//    @RabbitHandler
//    public void process(String message) {
//        //获取未佩戴安全帽检测事件接收对象，储存到数据库
//        HkNvrAlarm hkNvrAlarm = JSONObject.parseObject(message, HkAlarmFail.class);
//        hkNvrAlarm.setId(UUIDGenerator.generate());
//        hkNvrAlarmService.save(hkNvrAlarm);
//        log.info("海康其他事件:接收["+hkNvrAlarm.getEventName()+"]消息：" + JSON.toJSONString(message));
//    }
//
//}
